package com.belf.console.domain;

import com.belf.common.annotation.Excel;
import com.belf.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 校验任务对象 data_check_task
 * 
 * @author belf
 * @date 2024-07-16
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class DataCheckTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 任务模式 */
    @Excel(name = "任务模式")
    private String taskMode;

    /** 任务类型 */
    @Excel(name = "任务类型")
    private String taskType;
    /** 创建表、视图 */
    @Excel(name = "创建表、视图")
    private String jobType;

    /** 源数据库id */
    private String sourceId;

    /** 源数据库name */
    @Excel(name = "源数据库name")
    private String sourceName;
    private String sourceDatabase;

    /** 目标数据库id */
    private String sinkId;

    /** 目标数据库name */
    @Excel(name = "目标数据库name")
    private String sinkName;
    private String sinkDatabase;

    private String sourceDataSchema;
    private String sinkDataSchema;


    /** 任务调度器 */
    private Long jobId;

    /** 任务配置 */
    private String taskConf;
    /**  */
    @Excel(name = "")
    private String taskTables;

    /** 任务状态 */
    @Excel(name = "任务状态")
    private Long taskStatus;

    private Long status;

    /** 执行策略 */
    private Long strategy;

    private Integer monitorStatus;
    /** 调度器配置 */
    @Excel(name = "调度器配置")
    private String monitorConf;

    /** 描述 */
    private String dsc;

    private List<DataSourceInfo> dataSourceInfoList;

    public DataCheckTask() {
        super();
    }
    public DataCheckTask(Long taskId, String taskType) {
        this.id = taskId;
        this.taskType = taskType;
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTaskName(String taskName) 
    {
        this.taskName = taskName;
    }

    public String getTaskName() 
    {
        return taskName;
    }
    public void setTaskMode(String taskMode) 
    {
        this.taskMode = taskMode;
    }

    public String getTaskMode() 
    {
        return taskMode;
    }
    public void setTaskType(String taskType) 
    {
        this.taskType = taskType;
    }

    public String getTaskType() 
    {
        return taskType;
    }

    public void setSourceName(String sourceName) 
    {
        this.sourceName = sourceName;
    }

    public String getSourceName() 
    {
        return sourceName;
    }

    public void setSinkName(String sinkName) 
    {
        this.sinkName = sinkName;
    }

    public String getSinkName() 
    {
        return sinkName;
    }
    public void setJobId(Long jobId) 
    {
        this.jobId = jobId;
    }

    public Long getJobId() 
    {
        return jobId;
    }

    public void setTaskConf(String taskConf) 
    {
        this.taskConf = taskConf;
    }

    public String getTaskConf() 
    {
        return taskConf;
    }
    public void setTaskStatus(Long taskStatus) 
    {
        this.taskStatus = taskStatus;
    }

    public Long getTaskStatus() 
    {
        return taskStatus;
    }
    public void setStrategy(Long strategy)
    {
        this.strategy = strategy;
    }

    public Long getStrategy()
    {
        return strategy;
    }
    public void setDsc(String dsc) 
    {
        this.dsc = dsc;
    }

    public String getDsc() 
    {
        return dsc;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("taskName", getTaskName())
            .append("taskMode", getTaskMode())
            .append("taskType", getTaskType())
            .append("sourceId", getSourceId())
            .append("sourceName", getSourceName())
            .append("sinkId", getSinkId())
            .append("sinkName", getSinkName())
            .append("jobId", getJobId())
            .append("taskConf", getTaskConf())
            .append("taskStatus", getTaskStatus())
            .append("strategy", getStrategy())
            .append("dsc", getDsc())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
